<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>v-show|v-if</title>
    <script src="vue.js"></script>
</head>
<body>
<div id="app">
    <h1 v-show="!message">您必须输入内容</h1>
    <textarea v-model="message" row="10"></textarea>
    <br>
    <pre>
        {{$data|json}}
    </pre>
    <input type="button" value="提交" v-show="message">
</div>
<script type="text/javascript">
    new Vue({
        el:'#app',
        data:{
            message:''
        }
    })
</script>
</body>
</html>